text = """
Python is a popular programming language. It is widely used for web development, data science, and more.
Python has a simple and readable syntax, which makes it great for beginners.
"""
# text = """
# apple, banana. apple
# """
words = text.split()
print(words)

words_dist = {}
for word in words:
    word = word.strip('.,').lower()

    if word in words_dist:
        words_dist[word] += 1
    else:
        words_dist[word] = 1
    # word = word.strip('.')
    # for i in words_dist.keys():
    #     if i == word:
    #         words_dist[word] = words_dist[word] + 1
    #         break
    # else:
    #     words_dist[word] = 1

print(words_dist)
